package com.wowudi.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wowudi.entity.OperationRecord;
import com.wowudi.entity.OperationType;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface OperationTypeMapper extends BaseMapper<OperationType> {
    @Select("select * from operation_type ot ,department_class dc where ot.hdc_id=dc.dpc_id and ot.hoy_isdel=0 and(ot.hdc_id=#{cartid} or ot.hoy_name like CONCAT(CONCAT('%',#{patiname}),'%'))")
    @ResultMap("BaseResultMap")
    Page<OperationType> getAllBynameandid(@Param("page")Page<OperationType> page, @Param("cartid")String cartid, @Param("patiname")String patiname);

}